var ST = function (args) {
  for(var i in args) {
    this[i] = args[i];
  }
  this.funcs = {

  }
}
ST.prototype.http = function (method) {
  var self = this;
  var arg = self.https[method];
  $.ajax($.extend({}, arg, {
    type: 'post',
    success: self.httpsSuccess[method]
  }))
}
ST.prototype.pushAjax = function (ajax) {
  this.https = ajax;
}
ST.prototype.pushAjaxSuccess = function (succ) {
  this.httpsSuccess = succ
}
ST.prototype.changeInput = function (property,which) {
  this[property][which] = $('.' + which + ' input').val();
}
ST.prototype.changeInput2 = function (property,property2,which) {
  this[property][property2][which] = $('.' + which + ' .input').val();
  console.log(this[property])
}
ST.prototype.getLocationSearch = function (name) {
    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if(r!=null)return  decodeURI(r[2]); return null;
}
ST.prototype.render = function () {
  var _self = this;
  $('#golbalHeader').load('../directive/golbalHeader.html', function (res) {
    $('#golbalHeader .title').html(_self.golbalHeaderText);
    $('#golbalHeader a').on('click',_self.golbalHeaderFunc)
  })
  $('#golbalFooter').load('../directive/golbalFooter.html', function (res) {
    $('.external').eq(_self.golbalFooterIndex).addClass('active').siblings().removeClass('active');
  })
}